package com.flash.SystemManagement.mapper;

import com.flash.BusinessParameters.entity.Plate;
import com.flash.SystemManagement.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {
    @Select("select * from Users")
    List<User> selectUser();

    @Insert("insert into users values(#{userId},#{userName},#{userPas},#{userRoleId},#{userFlag})")
    public int insertUsers(User user);

    @Delete("delete from users where userId = #{userId}")
    int deleteUsers(int userId);

    //根据用户名查找
    @Select("select * from users where 1=1 and userName = ${userName} and rn between #{page} and #{limit}")
    List<User> selectLikeUser(Map map);


    @Update("update users set userName = #{userName},userPas = #{userPas},userRoleId=#{userRoleId},userFlag=#{userFlag} where userId=#{userId}")
    int updateUser(User user);
}
